package com.android.exchangeapp.modle

import android.graphics.Color

/**
 * Created by xiex on 2023/10/27.
 **/
data class JumpInfo(
    val url: String?,
    val statusBarColor: String?,
    val statusBarStyle: Int,
    val jumpKey: String,
    val pbKey: String,
    val afKey: String
)

fun String?.toColor(): Int {
    if (isNullOrEmpty()) {
        return Color.TRANSPARENT
    }
    return try {
        Color.parseColor(this)
    } catch (e: Exception) {
        Color.TRANSPARENT
    }
}